proc do_banlist {nick chan host} {
global botnick home bcast
if {![validchan $chan]} {
  putquick "NOTICE $nick :$chan is not a valid channel." 
  return 0
  }
if {[banlist $chan] == ""} {
  putquick "NOTICE $nick :I don't have any bans set for $chan"
  } else {
if {!([banlist $chan] == "")} {
  putlog "!$nick ($host)! banlist $chan"
  putquick "NOTICE $nick :The following bans are set in $chan through the bot (me!):"
if {$bcast == "1"} {
  putquick "PRIVMSG $home :$nick!$host requested my banlist for $chan....showing.."
  }
  foreach newban [banlist $chan] {
  set mask [lindex $newban 0]
  set reason [lindex $newban 1]
  set expire [lindex $newban 2]
  set added [lindex $newban 3]
  set setter [lindex $newban 5]
  set dateexpired [ctime $expire]
  set dateadded [ctime $added]
  putquick "NOTICE $nick :$mask BANNED By: \002$setter\002"
  putquick "NOTICE $nick :\002REASON\002: $reason"
  putquick "NOTICE $nick :\002BANNED FROM\002: $dateadded. \002UNTIL\002: $dateexpired." 
  }
  }
  }
  }









